package com.bw.skill.mvvm.model;

import com.bw.mvvm_common.entity.BaseEntity;
import com.bw.mvvm_common.mvvm.model.BaseModel;
import com.bw.mvvm_common.network.HttpEnum;
import com.bw.mvvm_common.network.HttpFactory;

import java.util.HashMap;

import io.reactivex.Observable;

/**
 * @author KK
 * @description:
 * @date :2021/10/26 16:11
 */
public class SecKillModel extends BaseModel {

    public Observable<BaseEntity> requestSeckill(HashMap<String,Object> map){
        return changeFunc(HttpFactory.create(HttpEnum.Token)
        .getRetrofit()
        .create(Api.class)
                .requestSecKill(createBody(map)));
    }

    public Observable<BaseEntity> requestAddSecKill(HashMap<String,Object> map){
        return changeFunc(HttpFactory.create(HttpEnum.Token)
                .getRetrofit()
                .create(Api.class)
                .requestAddSecKill(createBody(map)));
    }

}
